home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-08-18 | 4.3 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: ThinkHelperInstall.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Aug 18 21:36:24 1993, modified Wed Aug 18 21:36:24 1993, creator Think C, type ASCII, 3460 bytes "ThinkHelperInstall.c" , at 0xe04 514 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
49%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
33%
| TrID
| raw Group 3 FAX bitmap
| default (weak)
| |
16%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 54 68 69 6e 6b 48 | 65 6c 70 65 72 49 6e 73 |..ThinkH|elperIns|
|00000010| 74 61 6c 6c 2e 63 00 00 | 00 00 00 00 00 00 00 00 |tall.c..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 0d 84 00 | 00 02 02 a8 98 89 98 a8 |........|........|
|00000060| 98 89 98 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 36 db 00 00 |........|....6...|
|00000080| 2f 2a 0d 09 54 68 69 6e | 6b 48 65 6c 70 65 72 49 |/*..Thin|kHelperI|
|00000090| 6e 73 74 61 6c 6c 2e 63 | 0d 09 0d 09 69 6e 73 74 |nstall.c|....inst|
|000000a0| 61 6c 6c 73 20 61 20 70 | 61 74 63 68 20 74 6f 20 |alls a p|atch to |
|000000b0| 63 6f 64 65 20 73 65 67 | 6d 65 6e 74 73 20 23 30 |code seg|ments #0|
|000000c0| 20 26 20 31 20 74 6f 20 | 6c 6f 61 64 20 61 20 27 | & 1 to |load a '|
|000000d0| 54 48 4c 50 27 20 72 65 | 73 6f 75 72 63 65 0d 09 |THLP' re|source..|
|000000e0| 0d 09 a9 20 31 39 39 33 | 20 53 74 65 76 65 20 5a |... 1993| Steve Z|
|000000f0| 65 6c 6c 65 72 73 2c 20 | 41 6c 6c 20 52 69 67 68 |ellers, |All Righ|
|00000100| 74 73 20 52 65 73 65 72 | 76 65 64 0d 2a 2f 0d 0d |ts Reser|ved.*/..|
|00000110| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 2a 20 74 |unsigned| char* t|
|00000120| 68 65 45 72 72 6f 72 53 | 74 72 69 6e 67 20 3d 20 |heErrorS|tring = |
|00000130| 22 5c 70 22 3b 0d 0d 73 | 74 61 74 69 63 20 76 6f |"\p";..s|tatic vo|
|00000140| 69 64 20 49 6e 69 74 4d | 61 63 69 6e 74 6f 73 68 |id InitM|acintosh|
|00000150| 28 76 6f 69 64 29 20 0d | 7b 0d 09 49 6e 69 74 47 |(void) .|{..InitG|
|00000160| 72 61 66 28 26 71 64 2e | 74 68 65 50 6f 72 74 29 |raf(&qd.|thePort)|
|00000170| 3b 0d 09 49 6e 69 74 46 | 6f 6e 74 73 28 29 3b 0d |;..InitF|onts();.|
|00000180| 09 46 6c 75 73 68 45 76 | 65 6e 74 73 28 65 76 65 |.FlushEv|ents(eve|
|00000190| 72 79 45 76 65 6e 74 2c | 20 30 29 3b 0d 09 49 6e |ryEvent,| 0);..In|
|000001a0| 69 74 57 69 6e 64 6f 77 | 73 28 29 3b 0d 09 49 6e |itWindow|s();..In|
|000001b0| 69 74 4d 65 6e 75 73 28 | 29 3b 0d 09 54 45 49 6e |itMenus(|);..TEIn|
|000001c0| 69 74 28 29 3b 0d 09 49 | 6e 69 74 44 69 61 6c 6f |it();..I|nitDialo|
|000001d0| 67 73 28 6e 69 6c 29 3b | 0d 09 49 6e 69 74 43 75 |gs(nil);|..InitCu|
|000001e0| 72 73 6f 72 28 29 3b 0d | 09 4d 6f 72 65 4d 61 73 |rsor();.|.MoreMas|
|000001f0| 74 65 72 73 28 29 3b 0d | 09 4d 61 78 41 70 70 6c |ters();.|.MaxAppl|
|00000200| 5a 6f 6e 65 28 29 3b 0d | 7d 0d 0d 23 64 65 66 69 |Zone();.|}..#defi|
|00000210| 6e 65 20 45 72 72 6f 72 | 28 73 29 09 74 68 65 45 |ne Error|(s).theE|
|00000220| 72 72 6f 72 53 74 72 69 | 6e 67 20 3d 20 73 3b 0d |rrorStri|ng = s;.|
|00000230| 0d 0d 73 74 61 74 69 63 | 20 42 6f 6f 6c 65 61 6e |..static| Boolean|
|00000240| 20 50 61 74 63 68 50 72 | 6f 6a 65 63 74 4d 61 6e | PatchPr|ojectMan|
|00000250| 61 67 65 72 28 63 6f 6e | 73 74 20 46 53 53 70 65 |ager(con|st FSSpe|
|00000260| 63 2a 20 73 70 65 63 29 | 0d 7b 0d 09 2f 2f 20 74 |c* spec)|.{..// t|
|00000270| 6f 20 70 61 74 63 68 2c | 20 66 69 72 73 74 20 66 |o patch,| first f|
|00000280| 69 67 75 72 65 20 6f 75 | 74 20 77 68 61 74 20 63 |igure ou|t what c|
|00000290| 6f 64 65 20 73 65 67 6d | 65 6e 74 20 69 73 20 62 |ode segm|ent is b|
|000002a0| 65 69 6e 67 20 6c 6f 61 | 64 65 64 0d 09 48 61 6e |eing loa|ded..Han|
|000002b0| 64 6c 65 20 68 43 6f 64 | 65 53 65 67 6d 65 6e 74 |dle hCod|eSegment|
|000002c0| 30 3b 0d 09 48 61 6e 64 | 6c 65 20 68 43 6f 64 65 |0;..Hand|le hCode|
|000002d0| 53 65 67 6d 65 6e 74 4e | 3b 0d 09 73 68 6f 72 74 |SegmentN|;..short|
|000002e0| 20 77 68 69 63 68 43 6f | 64 65 53 65 67 6d 65 6e | whichCo|deSegmen|
|000002f0| 74 3b 0d 09 73 68 6f 72 | 74 20 73 65 67 6d 65 6e |t;..shor|t segmen|
|00000300| 74 4f 66 66 73 65 74 3b | 0d 09 73 68 6f 72 74 20 |tOffset;|..short |
|00000310| 68 6f 6d 65 52 65 66 4e | 75 6d 20 3d 20 43 75 72 |homeRefN|um = Cur|
|00000320| 52 65 73 46 69 6c 65 28 | 29 3b 0d 09 73 68 6f 72 |ResFile(|);..shor|
|00000330| 74 20 74 68 69 6e 6b 52 | 65 66 4e 75 6d 3b 0d 09 |t thinkR|efNum;..|
|00000340| 73 68 6f 72 74 20 73 65 | 67 6d 65 6e 74 53 69 7a |short se|gmentSiz|
|00000350| 65 3b 0d 09 48 61 6e 64 | 6c 65 20 68 48 65 6c 70 |e;..Hand|le hHelp|
|00000360| 65 72 3b 0d 09 48 61 6e | 64 6c 65 20 68 4c 6f 61 |er;..Han|dle hLoa|
|00000370| 64 65 72 3b 0d 09 0d 09 | 68 48 65 6c 70 65 72 20 |der;....|hHelper |
|00000380| 3d 20 47 65 74 31 52 65 | 73 6f 75 72 63 65 28 27 |= Get1Re|source('|
|00000390| 54 48 4c 50 27 2c 20 31 | 32 38 29 3b 0d 09 69 66 |THLP', 1|28);..if|
|000003a0| 20 28 68 48 65 6c 70 65 | 72 20 3d 3d 20 6e 69 6c | (hHelpe|r == nil|
|000003b0| 29 20 7b 0d 09 09 45 72 | 72 6f 72 28 22 5c 70 43 |) {...Er|ror("\pC|
|000003c0| 6f 75 6c 64 6e 27 74 20 | 6c 6f 61 64 20 48 65 6c |ouldn't |load Hel|
|000003d0| 70 65 72 20 70 61 74 63 | 68 22 29 3b 0d 09 09 72 |per patc|h");...r|
|000003e0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 09 7d 0d |eturn fa|lse;..}.|
|000003f0| 09 44 65 74 61 63 68 52 | 65 73 6f 75 72 63 65 28 |.DetachR|esource(|
|00000400| 68 48 65 6c 70 65 72 29 | 3b 0d 0d 09 68 4c 6f 61 |hHelper)|;...hLoa|
|00000410| 64 65 72 20 3d 20 47 65 | 74 31 52 65 73 6f 75 72 |der = Ge|t1Resour|
|00000420| 63 65 28 27 4c 4f 41 44 | 27 2c 20 31 32 38 29 3b |ce('LOAD|', 128);|
|00000430| 0d 09 69 66 20 28 68 4c | 6f 61 64 65 72 20 3d 3d |..if (hL|oader ==|
|00000440| 20 6e 69 6c 29 20 7b 0d | 09 09 45 72 72 6f 72 28 | nil) {.|..Error(|
|00000450| 22 5c 70 43 6f 75 6c 64 | 6e 27 74 20 6c 6f 61 64 |"\pCould|n't load|
|00000460| 20 4c 6f 61 64 65 72 20 | 70 61 74 63 68 22 29 3b | Loader |patch");|
|00000470| 0d 09 09 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b |...retur|n false;|
|00000480| 0d 09 7d 0d 09 0d 09 74 | 68 69 6e 6b 52 65 66 4e |..}....t|hinkRefN|
|00000490| 75 6d 20 3d 20 46 53 70 | 4f 70 65 6e 52 65 73 46 |um = FSp|OpenResF|
|000004a0| 69 6c 65 28 73 70 65 63 | 2c 20 66 73 52 64 57 72 |ile(spec|, fsRdWr|
|000004b0| 50 65 72 6d 29 3b 0d 09 | 69 66 20 28 74 68 69 6e |Perm);..|if (thin|
|000004c0| 6b 52 65 66 4e 75 6d 20 | 3d 3d 20 2d 31 29 0d 09 |kRefNum |== -1)..|
|000004d0| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0d |.return |false;..|
|000004e0| 09 55 73 65 52 65 73 46 | 69 6c 65 28 74 68 69 6e |.UseResF|ile(thin|
|000004f0| 6b 52 65 66 4e 75 6d 29 | 3b 0d 09 0d 09 68 43 6f |kRefNum)|;....hCo|
|00000500| 64 65 53 65 67 6d 65 6e | 74 30 20 3d 20 47 65 74 |deSegmen|t0 = Get|
|00000510| 31 52 65 73 6f 75 72 63 | 65 28 27 43 4f 44 45 27 |1Resourc|e('CODE'|
|00000520| 2c 20 30 29 3b 0d 09 69 | 66 20 28 68 43 6f 64 65 |, 0);..i|f (hCode|
|00000530| 53 65 67 6d 65 6e 74 30 | 20 3d 3d 20 6e 69 6c 29 |Segment0| == nil)|
|00000540| 20 7b 0d 09 09 45 72 72 | 6f 72 28 22 5c 70 43 6f | {...Err|or("\pCo|
|00000550| 75 6c 64 6e 27 74 20 6c | 6f 61 64 20 63 6f 64 65 |uldn't l|oad code|
|00000560| 20 73 65 67 6d 65 6e 74 | 20 30 22 29 3b 0d 09 09 | segment| 0");...|
|00000570| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 09 7d |return f|alse;..}|
|00000580| 0d 09 0d 09 61 73 6d 20 | 7b 0d 09 09 6d 6f 76 65 |....asm |{...move|
|00000590| 2e 6c 09 68 43 6f 64 65 | 53 65 67 6d 65 6e 74 30 |.l.hCode|Segment0|
|000005a0| 2c 61 30 0d 09 09 6d 6f | 76 65 2e 6c 09 28 61 30 |,a0...mo|ve.l.(a0|
|000005b0| 29 2c 61 30 0d 09 09 6d | 6f 76 65 2e 77 09 30 78 |),a0...m|ove.w.0x|
|000005c0| 31 30 28 61 30 29 2c 73 | 65 67 6d 65 6e 74 4f 66 |10(a0),s|egmentOf|
|000005d0| 66 73 65 74 0d 09 09 6d | 6f 76 65 2e 77 09 30 78 |fset...m|ove.w.0x|
|000005e0| 31 34 28 61 30 29 2c 77 | 68 69 63 68 43 6f 64 65 |14(a0),w|hichCode|
|000005f0| 53 65 67 6d 65 6e 74 0d | 09 7d 0d 0d 09 68 43 6f |Segment.|.}...hCo|
|00000600| 64 65 53 65 67 6d 65 6e | 74 4e 20 3d 20 47 65 74 |deSegmen|tN = Get|
|00000610| 31 52 65 73 6f 75 72 63 | 65 28 27 43 4f 44 45 27 |1Resourc|e('CODE'|
|00000620| 2c 20 77 68 69 63 68 43 | 6f 64 65 53 65 67 6d 65 |, whichC|odeSegme|
|00000630| 6e 74 29 3b 0d 09 69 66 | 20 28 68 43 6f 64 65 53 |nt);..if| (hCodeS|
|00000640| 65 67 6d 65 6e 74 4e 20 | 3d 3d 20 6e 69 6c 29 20 |egmentN |== nil) |
|00000650| 7b 0d 09 09 45 72 72 6f | 72 28 22 5c 70 63 6f 75 |{...Erro|r("\pcou|
|00000660| 6c 64 6e 27 74 20 6c 6f | 61 64 20 70 6f 73 73 69 |ldn't lo|ad possi|
|00000670| 62 6c 79 20 73 74 72 61 | 6e 67 65 20 63 6f 64 65 |bly stra|nge code|
|00000680| 20 73 65 67 6d 65 6e 74 | 22 29 3b 0d 09 09 72 65 | segment|");...re|
|00000690| 74 75 72 6e 20 66 61 6c | 73 65 3b 0d 09 7d 0d 09 |turn fal|se;..}..|
|000006a0| 0d 09 73 65 67 6d 65 6e | 74 53 69 7a 65 20 3d 20 |..segmen|tSize = |
|000006b0| 47 65 74 48 61 6e 64 6c | 65 53 69 7a 65 28 68 43 |GetHandl|eSize(hC|
|000006c0| 6f 64 65 53 65 67 6d 65 | 6e 74 4e 29 3b 0d 09 73 |odeSegme|ntN);..s|
|000006d0| 65 67 6d 65 6e 74 53 69 | 7a 65 20 2d 3d 20 34 3b |egmentSi|ze -= 4;|
|000006e0| 09 2f 2f 20 66 69 72 73 | 74 20 34 20 62 79 74 65 |.// firs|t 4 byte|
|000006f0| 73 20 6f 66 20 73 65 67 | 6d 65 6e 74 20 66 6f 72 |s of seg|ment for|
|00000700| 20 73 65 67 6d 65 6e 74 | 20 69 6e 66 6f 2c 20 74 | segment| info, t|
|00000710| 72 75 65 20 6f 66 66 73 | 65 74 20 69 73 20 73 69 |rue offs|et is si|
|00000720| 7a 65 20 6f 66 20 73 65 | 67 6d 65 6e 74 20 2d 20 |ze of se|gment - |
|00000730| 74 68 69 73 0d 09 0d 09 | 61 73 6d 20 7b 0d 09 09 |this....|asm {...|
|00000740| 6d 6f 76 65 2e 6c 09 68 | 43 6f 64 65 53 65 67 6d |move.l.h|CodeSegm|
|00000750| 65 6e 74 30 2c 61 30 0d | 09 09 6d 6f 76 65 2e 6c |ent0,a0.|..move.l|
|00000760| 09 28 61 30 29 2c 61 30 | 0d 09 09 6d 6f 76 65 2e |.(a0),a0|...move.|
|00000770| 77 09 73 65 67 6d 65 6e | 74 53 69 7a 65 2c 30 78 |w.segmen|tSize,0x|
|00000780| 31 30 28 61 30 29 0d 09 | 7d 0d 0d 09 2f 2f 20 77 |10(a0)..|}...// w|
|00000790| 72 69 74 65 20 6f 75 74 | 20 43 6f 64 65 20 53 65 |rite out| Code Se|
|000007a0| 67 6d 65 6e 74 20 30 0d | 09 7b 0d 09 09 73 68 6f |gment 0.|.{...sho|
|000007b0| 72 74 20 61 74 74 72 73 | 20 3d 20 47 65 74 52 65 |rt attrs| = GetRe|
|000007c0| 73 41 74 74 72 73 28 68 | 43 6f 64 65 53 65 67 6d |sAttrs(h|CodeSegm|
|000007d0| 65 6e 74 30 29 3b 0d 09 | 09 53 65 74 52 65 73 41 |ent0);..|.SetResA|
|000007e0| 74 74 72 73 28 68 43 6f | 64 65 53 65 67 6d 65 6e |ttrs(hCo|deSegmen|
|000007f0| 74 30 2c 20 30 29 3b 0d | 09 09 43 68 61 6e 67 65 |t0, 0);.|..Change|
|00000800| 64 52 65 73 6f 75 72 63 | 65 28 68 43 6f 64 65 53 |dResourc|e(hCodeS|
|00000810| 65 67 6d 65 6e 74 30 29 | 3b 0d 09 09 57 72 69 74 |egment0)|;...Writ|
|00000820| 65 52 65 73 6f 75 72 63 | 65 28 68 43 6f 64 65 53 |eResourc|e(hCodeS|
|00000830| 65 67 6d 65 6e 74 30 29 | 3b 0d 09 09 53 65 74 52 |egment0)|;...SetR|
|00000840| 65 73 41 74 74 72 73 28 | 68 43 6f 64 65 53 65 67 |esAttrs(|hCodeSeg|
|00000850| 6d 65 6e 74 30 2c 20 61 | 74 74 72 73 29 3b 0d 09 |ment0, a|ttrs);..|
|00000860| 09 57 72 69 74 65 52 65 | 73 6f 75 72 63 65 28 68 |.WriteRe|source(h|
|00000870| 43 6f 64 65 53 65 67 6d | 65 6e 74 30 29 3b 0d 09 |CodeSegm|ent0);..|
|00000880| 7d 0d 0d 09 2f 2f 20 77 | 72 69 74 65 20 6f 75 74 |}...// w|rite out|
|00000890| 20 63 6f 64 65 20 73 65 | 67 6d 65 6e 74 20 31 0d | code se|gment 1.|
|000008a0| 09 7b 0d 09 09 73 68 6f | 72 74 20 42 52 41 49 6e |.{...sho|rt BRAIn|
|000008b0| 73 74 72 75 63 74 69 6f | 6e 20 3d 20 30 78 36 30 |structio|n = 0x60|
|000008c0| 30 30 3b 20 2f 2f 20 62 | 72 61 20 5f 77 5f 20 69 |00; // b|ra _w_ i|
|000008d0| 6e 73 74 72 75 63 74 69 | 6f 6e 0d 09 09 73 68 6f |nstructi|on...sho|
|000008e0| 72 74 20 63 6f 64 65 4f | 66 66 73 65 74 3b 0d 09 |rt codeO|ffset;..|
|000008f0| 09 73 68 6f 72 74 20 61 | 74 74 72 73 20 3d 20 47 |.short a|ttrs = G|
|00000900| 65 74 52 65 73 41 74 74 | 72 73 28 68 43 6f 64 65 |etResAtt|rs(hCode|
|00000910| 53 65 67 6d 65 6e 74 4e | 29 3b 0d 0d 09 09 53 65 |SegmentN|);....Se|
|00000920| 74 52 65 73 41 74 74 72 | 73 28 68 43 6f 64 65 53 |tResAttr|s(hCodeS|
|00000930| 65 67 6d 65 6e 74 4e 2c | 20 30 29 3b 0d 0d 09 09 |egmentN,| 0);....|
|00000940| 2f 2f 20 61 70 70 65 6e | 64 20 74 68 65 20 6c 6f |// appen|d the lo|
|00000950| 61 64 65 72 0d 09 09 48 | 55 6e 6c 6f 63 6b 28 68 |ader...H|Unlock(h|
|00000960| 43 6f 64 65 53 65 67 6d | 65 6e 74 4e 29 3b 0d 09 |CodeSegm|entN);..|
|00000970| 09 48 61 6e 64 41 6e 64 | 48 61 6e 64 28 68 4c 6f |.HandAnd|Hand(hLo|
|00000980| 61 64 65 72 2c 20 68 43 | 6f 64 65 53 65 67 6d 65 |ader, hC|odeSegme|
|00000990| 6e 74 4e 29 3b 0d 09 09 | 2f 2f 20 61 70 70 65 6e |ntN);...|// appen|
|000009a0| 64 20 74 68 65 20 62 72 | 61 0d 09 09 50 74 72 41 |d the br|a...PtrA|
|000009b0| 6e 64 48 61 6e 64 28 26 | 42 52 41 49 6e 73 74 72 |ndHand(&|BRAInstr|
|000009c0| 75 63 74 69 6f 6e 2c 20 | 68 43 6f 64 65 53 65 67 |uction, |hCodeSeg|
|000009d0| 6d 65 6e 74 4e 2c 20 73 | 69 7a 65 6f 66 28 42 52 |mentN, s|izeof(BR|
|000009e0| 41 49 6e 73 74 72 75 63 | 74 69 6f 6e 29 29 3b 0d |AInstruc|tion));.|
|000009f0| 09 09 0d 09 09 2f 2f 20 | 66 69 67 75 72 72 65 20 |.....// |figurre |
|00000a00| 6f 75 74 20 74 68 65 20 | 6f 72 69 67 69 6e 61 6c |out the |original|
|00000a10| 20 63 6f 64 65 20 6f 66 | 66 73 65 74 0d 09 09 63 | code of|fset...c|
|00000a20| 6f 64 65 4f 66 66 73 65 | 74 20 3d 20 2d 47 65 74 |odeOffse|t = -Get|
|00000a30| 48 61 6e 64 6c 65 53 69 | 7a 65 28 68 43 6f 64 65 |HandleSi|ze(hCode|
|00000a40| 53 65 67 6d 65 6e 74 4e | 29 3b 0d 09 09 63 6f 64 |SegmentN|);...cod|
|00000a50| 65 4f 66 66 73 65 74 20 | 2b 3d 20 34 3b 0d 09 09 |eOffset |+= 4;...|
|00000a60| 63 6f 64 65 4f 66 66 73 | 65 74 20 2b 3d 20 73 65 |codeOffs|et += se|
|00000a70| 67 6d 65 6e 74 4f 66 66 | 73 65 74 3b 0d 09 09 50 |gmentOff|set;...P|
|00000a80| 74 72 41 6e 64 48 61 6e | 64 28 26 63 6f 64 65 4f |trAndHan|d(&codeO|
|00000a90| 66 66 73 65 74 2c 20 68 | 43 6f 64 65 53 65 67 6d |ffset, h|CodeSegm|
|00000aa0| 65 6e 74 4e 2c 20 73 69 | 7a 65 6f 66 28 63 6f 64 |entN, si|zeof(cod|
|00000ab0| 65 4f 66 66 73 65 74 29 | 29 3b 0d 0d 09 09 2f 2f |eOffset)|);....//|
|00000ac0| 20 77 72 69 74 65 20 69 | 74 20 62 61 63 6b 0d 09 | write i|t back..|
|00000ad0| 09 43 68 61 6e 67 65 64 | 52 65 73 6f 75 72 63 65 |.Changed|Resource|
|00000ae0| 28 68 43 6f 64 65 53 65 | 67 6d 65 6e 74 4e 29 3b |(hCodeSe|gmentN);|
|00000af0| 0d 09 09 57 72 69 74 65 | 52 65 73 6f 75 72 63 65 |...Write|Resource|
|00000b00| 28 68 43 6f 64 65 53 65 | 67 6d 65 6e 74 4e 29 3b |(hCodeSe|gmentN);|
|00000b10| 0d 09 09 53 65 74 52 65 | 73 41 74 74 72 73 28 68 |...SetRe|sAttrs(h|
|00000b20| 43 6f 64 65 53 65 67 6d | 65 6e 74 4e 2c 20 61 74 |CodeSegm|entN, at|
|00000b30| 74 72 73 29 3b 0d 09 09 | 57 72 69 74 65 52 65 73 |trs);...|WriteRes|
|00000b40| 6f 75 72 63 65 28 68 43 | 6f 64 65 53 65 67 6d 65 |ource(hC|odeSegme|
|00000b50| 6e 74 4e 29 3b 0d 09 7d | 0d 0d 09 2f 2f 20 61 64 |ntN);..}|...// ad|
|00000b60| 64 20 74 68 65 20 70 61 | 74 63 68 0d 09 41 64 64 |d the pa|tch..Add|
|00000b70| 52 65 73 6f 75 72 63 65 | 28 68 48 65 6c 70 65 72 |Resource|(hHelper|
|00000b80| 2c 20 27 54 48 4c 50 27 | 2c 20 55 6e 69 71 75 65 |, 'THLP'|, Unique|
|00000b90| 49 44 28 27 54 48 4c 50 | 27 29 2c 20 22 5c 70 54 |ID('THLP|'), "\pT|
|00000ba0| 68 69 6e 6b 20 48 65 6c | 70 65 72 20 50 61 74 63 |hink Hel|per Patc|
|00000bb0| 68 20 31 2e 30 62 31 22 | 29 3b 0d 09 43 68 61 6e |h 1.0b1"|);..Chan|
|00000bc0| 67 65 64 52 65 73 6f 75 | 72 63 65 28 68 48 65 6c |gedResou|rce(hHel|
|00000bd0| 70 65 72 29 3b 0d 09 57 | 72 69 74 65 52 65 73 6f |per);..W|riteReso|
|00000be0| 75 72 63 65 28 68 48 65 | 6c 70 65 72 29 3b 0d 0d |urce(hHe|lper);..|
|00000bf0| 09 55 70 64 61 74 65 52 | 65 73 46 69 6c 65 28 74 |.UpdateR|esFile(t|
|00000c00| 68 69 6e 6b 52 65 66 4e | 75 6d 29 3b 0d 09 43 6c |hinkRefN|um);..Cl|
|00000c10| 6f 73 65 52 65 73 46 69 | 6c 65 28 74 68 69 6e 6b |oseResFi|le(think|
|00000c20| 52 65 66 4e 75 6d 29 3b | 0d 0d 09 72 65 74 75 72 |RefNum);|...retur|
|00000c30| 6e 20 74 72 75 65 3b 0d | 7d 0d 0d 76 6f 69 64 20 |n true;.|}..void |
|00000c40| 6d 61 69 6e 28 29 0d 7b | 0d 09 53 46 54 79 70 65 |main().{|..SFType|
|00000c50| 4c 69 73 74 20 74 79 70 | 65 73 3b 0d 09 53 74 61 |List typ|es;..Sta|
|00000c60| 6e 64 61 72 64 46 69 6c | 65 52 65 70 6c 79 20 72 |ndardFil|eReply r|
|00000c70| 65 70 6c 79 3b 0d 0d 09 | 49 6e 69 74 4d 61 63 69 |eply;...|InitMaci|
|00000c80| 6e 74 6f 73 68 28 29 3b | 0d 0d 09 74 79 70 65 73 |ntosh();|...types|
|00000c90| 5b 30 5d 20 3d 20 27 41 | 50 50 4c 27 3b 0d 09 0d |[0] = 'A|PPL';...|
|00000ca0| 09 53 74 61 6e 64 61 72 | 64 47 65 74 46 69 6c 65 |.Standar|dGetFile|
|00000cb0| 28 6e 69 6c 2c 20 31 2c | 20 74 79 70 65 73 2c 20 |(nil, 1,| types, |
|00000cc0| 26 72 65 70 6c 79 29 3b | 0d 09 0d 09 69 66 20 28 |&reply);|....if (|
|00000cd0| 72 65 70 6c 79 2e 73 66 | 47 6f 6f 64 29 20 7b 0d |reply.sf|Good) {.|
|00000ce0| 09 09 69 66 20 28 50 61 | 74 63 68 50 72 6f 6a 65 |..if (Pa|tchProje|
|00000cf0| 63 74 4d 61 6e 61 67 65 | 72 28 26 72 65 70 6c 79 |ctManage|r(&reply|
|00000d00| 2e 73 66 46 69 6c 65 29 | 29 0d 09 09 09 50 61 72 |.sfFile)|)....Par|
|00000d10| 61 6d 54 65 78 74 28 22 | 5c 70 49 6e 73 74 61 6c |amText("|\pInstal|
|00000d20| 6c 61 74 69 6f 6e 20 77 | 61 73 20 73 75 63 63 65 |lation w|as succe|
|00000d30| 73 73 66 75 6c 21 22 2c | 20 22 5c 70 48 61 76 65 |ssful!",| "\pHave|
|00000d40| 20 61 20 6e 69 63 65 20 | 64 61 79 21 22 2c 20 22 | a nice |day!", "|
|00000d50| 5c 70 22 2c 20 22 5c 70 | 22 29 3b 0d 09 09 65 6c |\p", "\p|");...el|
|00000d60| 73 65 0d 09 09 09 50 61 | 72 61 6d 54 65 78 74 28 |se....Pa|ramText(|
|00000d70| 22 5c 70 49 6e 73 74 61 | 6c 6c 61 74 69 6f 6e 20 |"\pInsta|llation |
|00000d80| 77 61 73 20 4e 4f 54 20 | 73 75 63 63 65 73 73 66 |was NOT |successf|
|00000d90| 75 6c 21 22 2c 20 22 5c | 70 43 6f 6e 74 61 63 74 |ul!", "\|pContact|
|00000da0| 20 53 74 65 76 65 20 5a | 65 6c 6c 65 72 73 20 66 | Steve Z|ellers f|
|00000db0| 6f 72 20 68 65 6c 70 21 | 22 2c 20 22 5c 70 40 37 |or help!|", "\p@7|
|00000dc0| 35 34 36 30 2c 31 33 37 | 35 20 40 20 43 6f 6d 70 |5460,137|5 @ Comp|
|00000dd0| 75 73 65 72 76 65 22 2c | 20 74 68 65 45 72 72 6f |userve",| theErro|
|00000de0| 72 53 74 72 69 6e 67 29 | 3b 0d 09 09 0d 09 09 41 |rString)|;......A|
|00000df0| 6c 65 72 74 28 31 32 38 | 2c 20 6e 69 6c 29 3b 0d |lert(128|, nil);.|
|00000e00| 09 7d 0d 7d 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}.}....|........|
|00000e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e80| 00 00 01 00 00 00 01 a8 | 00 00 00 a8 00 00 00 5a |........|.......Z|
|00000e90| 52 65 66 4e 75 6d 3b 0d | 09 48 61 6e 64 6c 65 20 |RefNum;.|.Handle |
|00000ea0| 68 43 6f 64 65 53 65 67 | 6d 65 6e 74 31 2c 20 68 |hCodeSeg|ment1, h|
|00000eb0| 14 54 68 69 6e 6b 48 65 | 6c 70 65 72 49 6e 73 74 |.ThinkHe|lperInst|
|00000ec0| 61 6c 6c 2e 63 65 02 00 | 00 00 54 45 58 54 4b 41 |all.ce..|..TEXTKA|
|00000ed0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 50 01 20 |..TEXTKA|HL...P. |
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 41 52 a8 2a 7a c9 00 00 | 0d 84 00 00 02 02 74 68 |AR.*z...|......th|
|00000f00| 69 6e 6b 52 65 66 4e 75 | 6d 20 3d 3d 20 2d 31 29 |inkRefNu|m == -1)|
|00000f10| 0d 09 09 46 61 69 6c 45 | 72 72 28 52 65 73 45 72 |...FailE|rr(ResEr|
|00000f20| 72 6f 72 28 29 29 3b 0d | 09 0d 09 55 73 65 52 65 |ror());.|...UseRe|
|00000f30| 73 46 69 6c 65 28 74 68 | 69 6e 6b 52 65 66 4e 75 |sFile(th|inkRefNu|
|00000f40| 6d 29 3b 0d 09 68 43 6f | 64 65 53 65 67 6d 65 6e |m);..hCo|deSegmen|
|00000f50| 74 31 20 3d 20 47 65 74 | 31 52 65 73 6f 75 72 63 |t1 = Get|1Resourc|
|00000f60| 65 28 27 43 4f 44 45 27 | 2c 20 31 29 3b 0d 09 69 |e('CODE'|, 1);..i|
|00000f70| 66 20 28 68 43 6f 64 65 | 53 65 67 6d 65 6e 74 31 |f (hCode|Segment1|
|00000f80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 06 | 00 04 00 20 02 83 03 3a |........|... ...:|
|00000fb0| 05 cb 00 20 02 83 03 3a | 05 cb a8 97 f8 fb 00 00 |... ...:|........|
|00000fc0| 07 4f 00 00 09 04 00 00 | 05 41 01 00 00 00 00 58 |.O......|.A.....X|
|00000fd0| 00 03 00 1c 00 00 05 35 | 00 44 01 22 ce 50 00 00 |.......5|.D.".P..|
|00000fe0| 0d 73 65 67 6d 65 6e 74 | 4f 66 66 73 65 74 00 20 |.segment|Offset. |
|00000ff0| 00 00 00 b7 00 0a 01 22 | ce 1c 00 00 11 77 68 69 |......."|.....whi|
|00001000| 63 68 43 6f 64 65 53 65 | 67 6d 65 6e 74 20 00 1a |chCodeSe|gment ..|
|00001010| 00 00 00 b7 00 0a 01 22 | ce 10 00 00 0b 73 65 67 |......."|.....seg|
|00001020| 6d 65 6e 74 53 69 7a 65 | 00 00 01 00 00 00 01 a8 |mentSize|........|
|00001030| 00 00 00 a8 00 00 00 5a | 00 9a 17 f4 10 88 00 00 |.......Z|........|
|00001040| 00 1c 00 46 00 01 4d 50 | 53 52 00 00 00 12 44 54 |...F..MP|SR....DT|
|00001050| 56 55 00 00 00 1e 03 ed | 00 00 00 00 00 00 00 00 |VU......|........|
|00001060| 00 00 24 56 ff ff 00 00 | 00 4c 00 00 00 00 13 43 |..$V....|.L.....C|
|00001070| 72 65 61 74 65 64 20 62 | 79 20 43 4d 61 73 74 65 |reated b|y CMaste|
|00001080| 72 aa 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |r.......|........|
|00001090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+